package com.sendi.mobilework.api;

import com.sendi.mobilework.datamodel.ApplyParam;
import com.sendi.mobilework.datamodel.CompanyNews;
import com.sendi.mobilework.datamodel.Result;
import com.sendi.mobilework.datamodel.WorkArrange;
import com.sendi.mobilework.datamodel.Workflow;
import com.squareup.okhttp.Response;
import com.squareup.okhttp.ResponseBody;


import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;


/**
 * Created by Administrator on 2017/4/10.
 */

public interface Api {

    //登录
    @FormUrlEncoded
    @POST("login.action")
    Call<Result> login(@Field("id") int id, @Field("username") String username,
                             @Field("psw") String psw);

    //领导工作流程页数据
    @GET("findApply.action")
    Call<Workflow> getWorkflowManager();

    //获取值班信息数据
    @GET("findRota.action")
    Call<WorkArrange> getWorkArrange();

    //获取新闻信息
    @GET("findNews.action")
    Call<CompanyNews>getCompanyNews();
    //更新状态（审批意见）
    @FormUrlEncoded
    @POST("updateApply.action")
    Call<Result>updateStatus(@Field("id") String id,@Field("status")String status);


    @FormUrlEncoded
    @POST("saveApply.action")
    Call<Result> submitApply(@Field("name") String name, @Field("department") String department,
                                           @Field("time") String time, @Field("content") String content);


}
